From 26ed426c586494da88e54eb30f8b78b3303d8753 Mon Sep 17 00:00:00 2001 From: Reiner Steib Date: Tue, 31 Aug 2004 15:38:25 +0000 Subject: [PATCH] [ Merge from Gnus v5-10 branch. See the tags "gnus-5_10-pre-merge-josefsson" and "gnus-5_10-post-merge-josefsson". ] 2004-08-31 Simon Josefsson * rfc2231.el (rfc2231-parse-string): Restore whitespace syntax for ?* and ?\; (tiny patch). From Andreas Schwab . * ietf-drums.el (ietf-drums-syntax-table): Set syntax of ?* ?\; and ?\' to symbol instead of whitespace (tiny patch). From Andreas Schwab . 2004-08-31 Jesper Harder * message.el (message-idna-to-ascii-rhs-1): Don't choke on invalid addresses. 2004-08-31 Reiner Steib * message.el (message-idna-to-ascii-rhs-1): Fix typo. 2004-08-31 Lars Magne Ingebrigtsen * message.el (message-idna-to-ascii-rhs-1): Don't use equalp. 2004-08-31 Lars Magne Ingebrigtsen * gnus-art.el (article-decode-idna-rhs): Don't use message-idna-inside-rhs-p. 2004-08-31 Lars Magne Ingebrigtsen * message.el (message-idna-inside-rhs-p): Removed. (message-idna-to-ascii-rhs-1): Use proper address parsing. --- lisp/gnus/ChangeLog | 32 ++++++++++++++++++++++++++++++++ lisp/gnus/gnus-art.el | 4 +--- lisp/gnus/ietf-drums.el | 18 ++++++++++++++---- lisp/gnus/rfc2231.el | 5 ++++- 4 files changed, 51 insertions(+), 8 deletions(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 58b3021539f..8d5fbbff4bc 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,35 @@ +2004-08-31 Simon Josefsson + + * rfc2231.el (rfc2231-parse-string): Restore whitespace syntax for + ?* and ?\; (tiny patch). From Andreas Schwab . + + * ietf-drums.el (ietf-drums-syntax-table): Set syntax of ?* ?\; + and ?\' to symbol instead of whitespace (tiny patch). From + Andreas Schwab . + +2004-08-31 Jesper Harder + + * message.el (message-idna-to-ascii-rhs-1): Don't choke on + invalid addresses. + +2004-08-31 Reiner Steib + + * message.el (message-idna-to-ascii-rhs-1): Fix typo. + +2004-08-31 Lars Magne Ingebrigtsen + + * message.el (message-idna-to-ascii-rhs-1): Don't use equalp. + +2004-08-31 Lars Magne Ingebrigtsen + + * gnus-art.el (article-decode-idna-rhs): Don't use + message-idna-inside-rhs-p. + +2004-08-31 Lars Magne Ingebrigtsen + + * message.el (message-idna-inside-rhs-p): Removed. + (message-idna-to-ascii-rhs-1): Use proper address parsing. + 2004-08-31 Katsumi Yamaoka * gnus-agent.el (gnus-agent-restore-gcc): Use ^ and regexp-quote. diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index d18b86b7cb0..33833a8657b 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -2240,15 +2240,13 @@ If PROMPT (the prefix), prompt for a coding system to use." (inhibit-read-only t)) (article-narrow-to-head) (goto-char (point-min)) - (while (re-search-forward "\\(xn--[-A-Za-z0-9.]*\\)[ \t\n\r,>]" nil t) + (while (re-search-forward "@.*\\(xn--[-A-Za-z0-9.]*\\)[ \t\n\r,>]" nil t) (let (ace unicode) (when (save-match-data (and (setq ace (match-string 1)) (save-excursion (and (re-search-backward "^[^ \t]" nil t) (looking-at "From\\|To\\|Cc"))) - (save-excursion (backward-char) - (message-idna-inside-rhs-p)) (setq unicode (idna-to-unicode ace)))) (unless (string= ace unicode) (replace-match unicode nil nil nil 1))))))))) diff --git a/lisp/gnus/ietf-drums.el b/lisp/gnus/ietf-drums.el index d4137bae321..f8837076b56 100644 --- a/lisp/gnus/ietf-drums.el +++ b/lisp/gnus/ietf-drums.el @@ -1,5 +1,5 @@ ;;; ietf-drums.el --- Functions for parsing RFC822bis headers -;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 +;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 ;; Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen @@ -27,6 +27,16 @@ ;; Messages". This library is based on ;; draft-ietf-drums-msg-fmt-05.txt, released on 1998-08-05. +;; Pending a real regression self test suite, Simon Josefsson added +;; various self test expressions snipped from bug reports, and their +;; expected value, below. I you believe it could be useful, please +;; add your own test cases, or write a real self test suite, or just +;; remove this. + +;; +;; (ietf-drums-parse-address "'foo' ") +;; => ("foo@example.com" . "'foo'") + ;;; Code: (eval-when-compile (require 'cl)) @@ -64,9 +74,9 @@ backslash and doublequote.") (modify-syntax-entry ?> ")" table) (modify-syntax-entry ?@ "w" table) (modify-syntax-entry ?/ "w" table) - (modify-syntax-entry ?* " " table) - (modify-syntax-entry ?\; " " table) - (modify-syntax-entry ?\' " " table) + (modify-syntax-entry ?* "_" table) + (modify-syntax-entry ?\; "_" table) + (modify-syntax-entry ?\' "_" table) (if (featurep 'xemacs) (let ((i 128)) (while (< i 256) diff --git a/lisp/gnus/rfc2231.el b/lisp/gnus/rfc2231.el index cf4428ae5c1..b08fe215196 100644 --- a/lisp/gnus/rfc2231.el +++ b/lisp/gnus/rfc2231.el @@ -1,6 +1,7 @@ ;;; rfc2231.el --- Functions for decoding rfc2231 headers -;; Copyright (C) 1998, 1999, 2000, 2002, 2003 Free Software Foundation, Inc. +;; Copyright (C) 1998, 1999, 2000, 2002, 2003, 2004 +;; Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen ;; This file is part of GNU Emacs. @@ -56,6 +57,8 @@ The list will be on the form (mail-header-remove-comments string))) (let ((table (copy-syntax-table ietf-drums-syntax-table))) (modify-syntax-entry ?\' "w" table) + (modify-syntax-entry ?* " " table) + (modify-syntax-entry ?\; " " table) (modify-syntax-entry ?= " " table) ;; The following isn't valid, but one should be liberal ;; in what one receives. -- 2.30.2